SG-44731 Adopt Git LFS for tk-core vendored dependency ZIPs and Qt resources - #1128
Draft
julien-lang wants to merge 8 commits into
Draft
SG-44731 Adopt Git LFS for tk-core vendored dependency ZIPs and Qt resources#1128julien-lang wants to merge 8 commits into
julien-lang wants to merge 8 commits into
Conversation
- .tkdeploy: replace obsolete CI file exclusions (.travis.yml, appveyor.yml) with the files actually used today (.pre-commit-config.yaml, azure-pipelines.yml, build_resources.yml, codecov.yml, developer/) - azure-pipelines.yml: restrict branch trigger to master (was "*"), and temporarily pin the tk-ci-tools template ref to ticket/SG-44731-use-git-lfs for end-to-end testing before that PR merges - .gitattributes: minor formatting (blank lines, comment header for the LFS rule)
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (52.63%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #1128 +/- ##
==========================================
- Coverage 80.09% 80.08% -0.02%
==========================================
Files 203 203
Lines 19537 19556 +19
==========================================
+ Hits 15649 15661 +12
- Misses 3888 3895 +7
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
||
| qInitResources() | ||
| version https://git-lfs.github.com/spec/v1 | ||
| oid sha256:8376f448174f66831ffd5b1ee0a8c2a9275a3d98dfad3e4a24289069d2ddc107 |
|
|
||
|
|
||
| qInitResources() | ||
| version https://git-lfs.github.com/spec/v1 |
There was a problem hiding this comment.
missing whitespace after ':'
missing whitespace around arithmetic operator
Adds _validate_lfs_content(), called at the end of _clone_then_execute_git_commands(), the shared clone path used by both the git branch and git tag descriptors (persistent downloads and transient temp-clones alike). If the checked out repo's root .gitattributes declares filter=lfs, verifies via 'git lfs ls-files --json' that tracked files were actually smudged to their real content. Raises TankGitError if: - the git-lfs binary isn't installed/on PATH, or - any tracked file is still a bare LFS pointer (not checked out). Repos that don't declare LFS tracking skip the check entirely, so there's no new dependency on git-lfs for the vast majority of existing git descriptors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Adopts Git LFS for large vendored/binary files in
tk-coreto reduce repo/clone size.Changes
requirements/**/*.zip(pkgs.zipfor all supported Python versions,flow_data_sdk-beta.zip) are now tracked via Git LFS (filter=lfs diff=lfs merge=lfs -textin.gitattributes).python/tank/**/resources_rc.py(compiled Qt resources, previously large embedded-binary Python source files) and*.ttf(Qt UI fonts) are now tracked via Git LFS as well..tkdeploy: refreshed the packaging exclusion list, replacing obsolete CI file names (.travis.yml,appveyor.yml) with the ones actually used today (.pre-commit-config.yaml,azure-pipelines.yml,build_resources.yml,codecov.yml,developer/).azure-pipelines.yml: restricted the branch trigger tomaster(was*).python/tank/descriptor/io_descriptor/git.py: added_validate_lfs_content()on the sharedIODescriptorGitbase class, called after every clone in_clone_then_execute_git_commands()(covers both the branch and tag descriptors, for persistent downloads and transient temp-clones alike). If the checked out repo declaresfilter=lfsin.gitattributes, this verifies viagit lfs ls-files --jsonthat tracked files were actually resolved to real content, and raises a clear error if git-lfs isn't installed or some content is still a bare pointer, instead of silently proceeding with broken files.docs/descriptor.rst: documented the new Git LFS requirements for thegit/git_branchdescriptors (needgit-lfsinstalled, or Toolkit raises an error) and for thegithub_releasedescriptor (repo's "Include Git LFS objects in archives" GitHub setting must be enabled, since release archives otherwise contain unresolved LFS pointer files).Note before merging
azure-pipelines.ymlcurrently pins thetk-ci-toolstemplate ref torefs/heads/ticket/SG-44731-use-git-lfs(markedTEMPin the file) so this branch can be end-to-end tested against tk-ci-tools#77 before that PR merges.This must be reverted to
masteronce tk-ci-tools#77 is merged, or CI on this branch will keep depending on an unmerged branch.Testing
_validate_lfs_content()verified locally against 4 scenarios: LFS content properly downloaded, non-LFS repo, missing git-lfs binary, and a real unsmudged clone (GIT_LFS_SKIP_SMUDGE=1) - all detected correctly.